About
Spud is a generic system for defining, writing and processing options files for scientific computer models.
The interfaces to scientific computer models are frequently primitive, under-documented and ad-hoc text files. This makes using and developing the model in question difficult and error-prone.
With Spud, the model developer need only write a rules file (schema) which defines the options which the model takes and the relationship between them. The Spud component Diamond then provides an automatically generated graphical user interface which guides the user and validates the user's input against the schema. Diamond writes out an xml options file for use in Spud.
The developer then uses libspud to read the options file into the model. Libspud can read any valid options file without further code modifications and makes the options available at any point in the model code at which they are required.
Spud further provides the facility for the schema to be self-documenting and Diamond presents this documentation to the model user in a context-sensitive manner.
Spud components
The spud system has three main components:
Spud base language
This is a set of core data types upon which Spud schemas can be built. The base language relieves model developers of the need to write low level rules for basic numeric data types.
Diamond
Diamond is the automatic user interface. Diamond reads the model-specific schema file and automatically generates a user interface which assists the user to set the options specified in the schema. Diamond validates user input against the schema and provides immediate feedback to the user on the validity of their options.
Libspud
Libspud provides the model with a ready-made way to read Spud options files. The library recreates the tree of options in memory and provides access functions in Fortran, C and C++ which enable the model developer to access any option from any point in the model code.
More information and documentation
A full description of the Spud system is provided in this paper and there is a set of slides from a talk describing the integration of Spud into Fluidity/ICOM here. Developer documentation for Spud users is provided in the spud manual.
Downloading Spud
Bzr Access
Spud source code is held in a bzr repository. The current development version is available via:
bzr co lp:spud |
Details on how to build and use Spud are in the spud manual.
Ubuntu repositories
The current Spud release in binary (i386 and amd64) or source form is available from the AMCG Ubuntu package archive. To add this repository to your system sources, run:
sudo apt-add-repository ppa:fluidity-core/ppa |
If you have a very minimal install of Ubuntu, you may need to install the python-software-properties package to get apt-add-repository.
Installing the packages
Ubuntu users can install the current packages by typing:
wajig update wajig install diamond libspud-dev |
The source is available via:
wajig update wajig source spud |
Contact
The spud developers can be contacted via David Ham.